function fn_get_menu(menuId){

	$.ajax({
	  type: "GET",
	  url: "/api/api/queryViewMenuNew",
	  data: {menuId:'0'},
	  dataType: "json",
	  success: function(data){
	 	  var hs = "";
	 	  var fs = "";
	      $.each(data, function(commentIndex, comment){

              if(comment['children']){
                  if(comment['menuName']!='首页'){fs+= "<li id=\"fl_menu_"+comment['menuId']+"\"><h1>"+comment['menuName']+"</h1>";}
                  hs+= "<li class='chanpin1'><a onMouseOver=\"fn_menu_over(this,'"+comment['menuId']+"','"+menuId+"')\" onMouseOut=\"fn_menu_out(this,'"+comment['menuId']+"','"+menuId+"')\" href=\""+ comment['menuViewurl'] + "?menuId=" + comment['menuId'] +"\" class="+(comment['menuId']==menuId?'active':'')+">"+comment['menuName']+"</a>";
                  hs+="<ul class=\"hide1\">";
                  $(comment['children']).each(function(i,cmm){
                      if(comment['menuName']!='首页'){fs+= "<a href=\""+ cmm['menuViewurl'] + "?menuId=" + cmm['menuId'] +"\">"+cmm['menuName']+"</a>";}
                      hs+= "<li><a href=\""+ cmm['menuViewurl'] + "?menuId=" + cmm['menuId'] + "\">"+cmm['menuName'];
                      hs+= "</a></li>";
                      if(cmm['children']){
                          $(cmm['children']).each(function(i,cm){
                              hs+="<li style=\"width: 100%;float: right;line-height: 30px;\"><a href=\""+ cm['menuViewurl'] + "?menuId=" + cm['menuId'] +"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;>"+cm['menuName']+"</a></li>";
                          })
                      }
                  });
                  if(comment['menuName']!='首页'){fs+= "</li>";}
                  hs+="</ul>";
              }else{
                  if(comment['menuName']!='首页' && comment['menuName']!='安能快递'){
                      fs+= "<li id=\"fl_menu_"+comment['menuId']+"\"><h1>"+comment['menuName']+"</h1></li>";
                  }
                  hs+= "<li><a onMouseOver=\"fn_menu_over(this,'"+comment['menuId']+"','"+menuId+"')\" onMouseOut=\"fn_menu_out(this,'"+comment['menuId']+"','"+menuId+"')\" href=\""+ comment['menuViewurl'] + "?menuId=" + comment['menuId'] + "\" class="+(comment['menuId']==menuId?'active':'')+">"+comment['menuName']+"</a>";
              }
	      	    hs+= "</li>";

	      });
	      $("#ul_head_menu").html(hs);
	      $(".footer-top").html(fs+$(".footer-top").html());
	  }
	});
}
function fn_menu_over(obj,objMenuId,pageMenuId){
	if(objMenuId!=pageMenuId){
		$(obj).attr("class","active");
	}
}
function fn_menu_out(obj,objMenuId,pageMenuId){
	if(objMenuId!=pageMenuId){
		$(obj).removeClass("active"); 
	}
}